home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / e_os208 / example8 / example8.asm next >
Assembly Source File  |  1996-06-09  |  2KB  |  61 lines

  1. ;╔══════════════════════════════════════════════════════════════════════════╗
  2. ;║                                                                          ║
  3. ;║ Load a FLC and display in 320x200 256 colours with FLI32 Lib             ║
  4. ;║                                                                          ║
  5. ;║ Tabs : 13 21 29 37                                                       ║
  6. ;║                                                                          ║
  7. ;╚══════════════════════════════════════════════════════════════════════════╝
  8.  
  9. Locals
  10. .386
  11. CODE32 SEGMENT PUBLIC PARA 'CODE' USE32
  12. ASSUME  CS:CODE32,DS:CODE32,ES:CODE32
  13.  
  14. INCLUDE ..\RESOURCE\EOS.INC
  15.  
  16. File_FLC    db '..\data\test.FLC',0
  17. File_Txt    db '    ■ File error !',13,10,36
  18.  
  19. Start32:
  20.             mov ah,Use_Int_09       ; Use Internal Keyboard handler to use keyboard
  21.             mov bx,On
  22.             Int_EOS
  23.  
  24.             mov edx, O File_FLC     ; Load a FLI or FLC intro the memory
  25.             call Load_Fli           ; Initialize if needed the track-disk mode
  26.             jc Fli_Error            ; and check the header
  27.  
  28.             mov ax,13h              ; Set VGA 320*200 256c
  29.             DosInt 10h
  30.  
  31.             mov ah,Allocate_Selector
  32.             mov esi,0a0000h
  33.             mov edi,0fh
  34.             Int_EOS
  35.             mov es,bx               ; Set es to VRAM
  36.  
  37.             call First_Frame_Fli    ; Uncompress the first frame
  38.             jc Fli_Error
  39. @@again:
  40.             mov ah,Wait_Vbl         ; Wait the vertical retrace
  41.             Int_EOS
  42.  
  43.             call Next_Frame_Fli     ; Uncompress next frame
  44.             jc Fli_Error
  45.  
  46.             cmp Key_Map[Escape],On  ; Test if the Esc key is pressed
  47.             jne @@again
  48.  
  49.             call Dispose_Fli        ; Freeing memory and close file
  50.  
  51.             mov ax,4c00h            ; Exit with Error Code 0
  52.             int 21h                 ; and Automaticly restore video Mode
  53.  
  54. Fli_Error:
  55.             mov edx,offset File_Txt ; Restore initial Video mode, interrupts, free all reserved
  56.             mov ah,Exit_Error       ; memory ,stop music if played and exit with a error
  57.             Int_EOS                 ; message and Error Code 1
  58.  
  59.             CODE32 ENDS
  60.  
  61.             END